#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/9/8 14:35
# @Author : 吴敬超
# explain:
import multiprocessing
import time


def func(msg,kks):
    for i in xrange(3):
        print msg
        print kks
        time.sleep(1)


if __name__ == "__main__":
    pool = multiprocessing.Pool(processes=4)
    for i in xrange(10):
        msg = "hello %d" % (i)
        kks="*******"
        pool.apply_async(func, (msg,kks,))
    pool.close()
    pool.join()
    print "Sub-process(es) done."
